<?php
JunctionFileCabinet::using("Junction_Core_Session");
JunctionFileCabinet::using("Test_Mock_Mapping");

class Test_Junction_Core_Session extends UnitTestCase {
	
	/**
	 * Session
	 *
	 * @var Junction_Core_Session
	 */
	private $_session;
	
	public function __construct() {
		$this->_session = new Junction_Core_Session(new Test_Mock_Mapping());
	}
	
	public function testLoad() {
		$query = $this->_session->createQuery("Id == ?");
		$query->bind(0, 4);
		$results = $this->_session->loadWhere($query);
		$values = array();
		foreach ($results as $result) {
			$values[] = $result;
		}
		$this->assertTrue(count($values) > 0);
		
		$results = $this->_session->loadWhere();
		$values = array();
		foreach ($results as $result) {
			$values[] = $result;
		}
		$this->assertTrue(count($values) > 0);
	}
	
}
?>